{% extends "../layout.html" %}

{% block content %}
<div class="row">
  <div class="col-4">
    <div class="dy-wrapper profile-list">
      <div class="mb-4 data-row">
        用户名：  {{ data.name }}
      </div>
      <div class="mb-4 data-row">
        登录次数： {{ data.login_count }}
      </div>
      <div class="mb-4 data-row">
        最后登录： {{ data.last_login.format("%Y-%m-%d") }}
      </div>
    </div>
  </div>
  <div class="col-8">
    <div class="dy-wrapper form">
      <form action="/admin/edit/{{ auth.id }}" method="post" class="needs-validation" novalidate>
        <div class="row mb-3">
          <label for="name" class="col-sm-2 col-form-label text-end">用户名</label>
          <div class="col-sm-10 position-relative">
            <input type="text" class="form-control" id="name" name="name" value="{{ data.name }}" placeholder="请输入用户名" required />
            <div class="invalid-tooltip">用户名必须填写</div>
          </div>
        </div>
        <div class="row mb-3">
          <label for="password" class="col-sm-2 col-form-label text-end">密码</label>
          <div class="col-sm-10 position-relative">
            <input type="text" class="form-control" id="password" name="password" value="" placeholder="请输入密码" required />
            <div class="invalid-tooltip">密码必须填写</div>
          </div>
        </div>
        
        <div class="row mb-3">
            <label class="col-sm-2 col-form-label"></label>
            <div class="col-sm-10">
                <button type="submit" class="btn btn-sky-blue ">保存</button>
            </div>
        </div>
      </form>
    </div>
  </div>
</div>
{% endblock %}